home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-MIPS / PTRACE.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  71 lines

  1. /* $Id: ptrace.h,v 1.3 1998/07/09 21:45:21 ralf Exp $
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1994, 1995, 1996, 1997, 1998 by Ralf Baechle
  8.  *
  9.  * Machine dependent structs and defines to help the user use
  10.  * the ptrace system call.
  11.  */
  12. #ifndef __ASM_MIPS_PTRACE_H
  13. #define __ASM_MIPS_PTRACE_H
  14.  
  15. #include <linux/types.h>
  16.  
  17. /* 0 - 31 are integer registers, 32 - 63 are fp registers.  */
  18. #define PC        64
  19. #define CAUSE        65
  20. #define MMLO        66
  21. #define MMHI        67
  22. #define FPC_CSR        68    /* XXX */
  23. #define FPC_EIR        69    /* XXX */
  24. #define FPR_BASE    70    /* XXX */
  25.  
  26. #ifndef __ASSEMBLY__
  27. /*
  28.  * This struct defines the way the registers are stored on the stack during a
  29.  * system call/exception. As usual the registers k0/k1 aren't being saved.
  30.  */
  31. struct pt_regs {
  32.     /* Pad bytes for argument save space on the stack. */
  33.     unsigned long pad0[6];
  34.  
  35.     /* Saved main processor registers. */
  36.     unsigned long regs[32];
  37.  
  38.     /* Other saved registers. */
  39.     unsigned long lo;
  40.     unsigned long hi;
  41.  
  42.     /*
  43.      * saved cp0 registers
  44.      */
  45.     unsigned long cp0_epc;
  46.     unsigned long cp0_badvaddr;
  47.     unsigned long cp0_status;
  48.     unsigned long cp0_cause;
  49. };
  50.  
  51. #endif /* !(__ASSEMBLY__) */
  52.  
  53. #include <asm/offset.h>
  54.  
  55. #ifdef __KERNEL__
  56.  
  57. #ifndef __ASSEMBLY__
  58. /*
  59.  * Does the process account for user or for system time?
  60.  */
  61. #define user_mode(regs) ((regs)->cp0_status & 0x10)
  62.  
  63. #define instruction_pointer(regs) ((regs)->cp0_epc)
  64.  
  65. extern void (*show_regs)(struct pt_regs *);
  66. #endif /* !(__ASSEMBLY__) */
  67.  
  68. #endif
  69.  
  70. #endif /* __ASM_MIPS_PTRACE_H */
  71.